{include file="Index/header" /}
 
<body>
<div class="formbody">
<div class="formtitle"><span>商品列表</span></div> 
	<form action="{:url('Goods/index')}" method="post">
		<ul class="seachform">
			<li><label>商品名称</label>
				<input name="title" type="text" class="scinput" value="{$title}"/>&nbsp;&nbsp; 
			</li>
			<li><label>商品分类</label>
				<select name="category_id" class="form-select">
					<option value="0">全部</option>
					
					{volist name="catagoryArr" id="vo" key="k" } 
					<option {if $key==$category_id} selected {/if} value="{$key}">{$vo}</option>
					{/volist}
					 
				</select>
			</li>
			
			<li><label>状态</label>
				<select name="status" class="form-select">
					<option value="0">--全部--</option>
					<option {if $status=="1"} selected {/if}  value="1">待售</option>
					<option {if $status=="2"} selected {/if}  value="2">已成交</option> 
				</select>
				
			</li>
			
			<li><label>&nbsp;</label>
				<input name="query" type="submit" class="scbtn" value="查询" />
			</li>
		</ul>
	</form>

	<table class="tablelist" >
		<thead>
			<tr>
				<th>编号</th>
				<th>商品名称</th>
				<th>商品分类</th> 
				<th width="130">售前价格</th>  
				<th width="130">成交价</th> 
				<th>规格</th> 
				<th>款识</th> 
				<th width="80">是否热门</th>
				<th width="80">状态</th>
				<th width="60">点击量</th>
				<th width="130">发布时间</th>
				<th >操作</th>
			</tr>
		</thead>
		<tbody>
		 	{volist name="listArr" id="vo" key="k" } 
			<tr>
				<td>{$vo.id}</td>
				<td>{$vo.title}</td>
				<td>{$catagoryArr[$vo['category_id']]}</td> 
				<td>
					<font color=red>
					{if is_numeric($vo[presale_price])}
						{:number_format($vo[presale_price])}
					{else /}
					 	{$vo.presale_price}
					{/if}
					 </font>
				</td> 
				<td>
					<font color=red>
					{if is_numeric($vo[actual_price])}
						{:number_format($vo[actual_price])}
					{else /}
						{$vo.actual_price}
					{/if}
					 </font>
				</td>
				<td>{$vo.standard}</td>
				<td>{$vo.code}</td>
				 
				<td>
					{if $vo[is_hot]=="1"}
						<font color=red><b>热门</b></font>
					{else /}
						<font color=grey><b>无</b></font>
					{/if}
				</td>
				<td>
					{if $vo[status]=="1"}
						<font color=grey><b>待售</b></font>
					{else /}
						<font color=green><b>已成交</b></font> 
					{/if}
					
				</td> 
				<td>{$vo.click_num}</td>
				<td>{:date("Y-m-d",$vo[on_time]);}</td>
				
				
				<td>
					 
					<a href="{:url('Goods/add', array('gid'=>$vo[id]))}" class="tablelink">编辑</a>
					 <a href="{:url('Goods/delete', array('gid'=>$vo[id]))}" class="tablelink">删除</a>
				</td> 
			 
			</tr>
		 	{/volist}
		</tbody>
	</table>
	<div class="page">
					{$pages}
	</div>
 
</div>

{include file="Index/footer" /}